package com.companion.companion.domain;

import java.util.Date;


/**
 * 聊天消息记录对象 message
 * 
 * @author zly
 * @date 2025-05-06
 */
public class Message
{

    /** 消息ID */
    private Long messageId;

    /** 所属会话ID */
    private Long conversationId;

    /** 发送者角色（0用户，1护工） */
    private Long senderRole;

    /** 发送者ID（用户或护工） */
    private Long senderId;

    /** 消息内容 */
    private String content;

    /** 发送时间 */
    private Date timestamp;

    public Message() {
    }

    public Message(Long messageId, Long conversationId, Long senderRole, Long senderId, String content, Date timestamp) {
        this.messageId = messageId;
        this.conversationId = conversationId;
        this.senderRole = senderRole;
        this.senderId = senderId;
        this.content = content;
        this.timestamp = timestamp;
    }

    /**
     * 获取
     * @return messageId
     */
    public Long getMessageId() {
        return messageId;
    }

    /**
     * 设置
     * @param messageId
     */
    public void setMessageId(Long messageId) {
        this.messageId = messageId;
    }

    /**
     * 获取
     * @return conversationId
     */
    public Long getConversationId() {
        return conversationId;
    }

    /**
     * 设置
     * @param conversationId
     */
    public void setConversationId(Long conversationId) {
        this.conversationId = conversationId;
    }

    /**
     * 获取
     * @return senderRole
     */
    public Long getSenderRole() {
        return senderRole;
    }

    /**
     * 设置
     * @param senderRole
     */
    public void setSenderRole(Long senderRole) {
        this.senderRole = senderRole;
    }

    /**
     * 获取
     * @return senderId
     */
    public Long getSenderId() {
        return senderId;
    }

    /**
     * 设置
     * @param senderId
     */
    public void setSenderId(Long senderId) {
        this.senderId = senderId;
    }

    /**
     * 获取
     * @return content
     */
    public String getContent() {
        return content;
    }

    /**
     * 设置
     * @param content
     */
    public void setContent(String content) {
        this.content = content;
    }

    /**
     * 获取
     * @return timestamp
     */
    public Date getTimestamp() {
        return timestamp;
    }

    /**
     * 设置
     * @param timestamp
     */
    public void setTimestamp(Date timestamp) {
        this.timestamp = timestamp;
    }

    public String toString() {
        return "Message{messageId = " + messageId + ", conversationId = " + conversationId + ", senderRole = " + senderRole + ", senderId = " + senderId + ", content = " + content + ", timestamp = " + timestamp + "}";
    }
}
